const Controller = require('egg').Controller;

class VersionsController extends Controller {
    async index() {
        const ctx = this.ctx;
        const siteId = ctx.query.siteId;
        const versions = await ctx.service.version.findVersions({ siteId });
        if (versions) {
            ctx.body = {
                code: 200,
                data: versions,
                success: true,
                msg: ``
            };
        }
    }
}

module.exports = VersionsController;